package com.example.demo.vo

import com.example.demo.dao.TNurseDao
import com.example.demo.dao.TPatientCareLabelRefDao
import com.example.demo.dbmodels.TPatient
import com.example.demo.dbmodels.TPatientCareLabelRef
import me.liuwj.ktorm.dsl.QueryRowSet
import java.time.LocalDateTime

class PatientCareLabelRefVo {

    /**
     *  id
     **/
    var id: Int? = null
    /**
     *  科室编码
     **/
    var dept_code: String? =null
    /**
     *  床号
     **/
    var bed_code: String? = null
    /**
     *  病人id
     **/
    var patient_id: String? = null
    /**
     *  护理标签id
     **/
    var care_label_id: String? = null
    /**
     *  创建时间
     **/
    var update_time: String? = null
    /**
     *  创建人
     **/
    var update_by: Int?= null
    /**
     *  删除标记
     **/
    var is_del: Boolean?= null

    fun getVo(queue: QueryRowSet): PatientCareLabelRefVo {
        queue.let {
            val data = PatientCareLabelRefVo()
            data.bed_code = it[TPatientCareLabelRefDao.bed_code]
            data.care_label_id =it[TPatientCareLabelRefDao.care_label_id]
            data.dept_code = it[TPatientCareLabelRefDao.dept_code]
            data.id =it[TPatientCareLabelRefDao.id]
            data.is_del =it[TPatientCareLabelRefDao.is_del]
            data.patient_id = it[TPatientCareLabelRefDao.patient_id]
            data.update_by =it[TPatientCareLabelRefDao.update_by]
            data.update_time =it[TPatientCareLabelRefDao.update_time]
            return  data
        }

    }


    fun getVo(table: TPatientCareLabelRef): PatientCareLabelRefVo {
        table.let {
            val data = PatientCareLabelRefVo()
            data.bed_code = it.bed_code
            data.care_label_id = it.care_label_id
            data.dept_code = it.dept_code
            data.id = it.id
            data.is_del = it.is_del
            data.patient_id = it.patient_id
            data.update_by = it.update_by
            data.update_time = it.update_time
            return  data
        }
    }

}